Skip to content

Add Apple code signing and notarization support #1

Open
leftouterjoins wants to merge 2 commits intomasterfrom
feature/apple-signing
Open

Add Apple code signing and notarization support #1
leftouterjoins wants to merge 2 commits intomasterfrom
feature/apple-signing

Conversation

@leftouterjoins
Copy link
Copy Markdown
Owner

This pull request introduces automated Apple Developer ID code signing and notarization for the macOS installer package, making releases compliant with Gatekeeper and eliminating warning dialogs for users. The workflow now conditionally signs and notarizes packages when the appropriate secrets are configured, and detailed documentation is included to guide setup and troubleshooting. The installer build script (build-pkg.sh) has been enhanced to support both unsigned and signed builds via a new --sign flag.

Key changes:

Apple Code Signing & Notarization Integration

  • The GitHub Actions release workflow (.github/workflows/release.yml) now imports Apple certificates from secrets, signs the installer if configured, submits it for notarization, staples the notarization ticket, and cleans up the temporary keychain. These steps are only performed if the relevant secrets are present, otherwise an unsigned package is built as before.

Installer Build Script Enhancements

  • Installer/build-pkg.sh now supports a --sign flag to enable code signing, with logic to sign the binary, component package, and final product archive using Developer ID certificates. The script auto-detects signing identities if not provided, and prints clear status messages about signing and next steps. [1] [2] [3] [4] [5] [6]

Documentation

  • Added docs/APPLE_SIGNING.md, which explains the code signing and notarization process, setup instructions for Apple certificates and GitHub secrets, and troubleshooting tips. This provides a comprehensive guide for maintainers to enable and manage signed releases.

leftouterjoins and others added 2 commits December 20, 2025 06:47
Add support for signing the installer package with Apple Developer ID:

build-pkg.sh:
- Add --sign flag to enable code signing
- Sign binary with hardened runtime (codesign)
- Sign component package (pkgbuild --sign)
- Sign final product archive (productsign)

release.yml:
- Add certificate import step (creates temporary keychain)
- Conditional signing based on APPLE_CERTIFICATE_P12 secret
- Notarization via xcrun notarytool
- Stapling via xcrun stapler
- Keychain cleanup on job completion

Required GitHub Secrets (when ready):
- APPLE_CERTIFICATE_P12 (base64-encoded .p12)
- APPLE_CERTIFICATE_PASSWORD
- APPLE_ID
- APPLE_TEAM_ID
- APPLE_APP_PASSWORD (app-specific password)

Without secrets, releases continue to build unsigned packages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the complete setup process for enabling Apple Developer ID
signing and notarization for the installer package.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant